home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3915 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.3 KB  |  30 lines

  1. Path: gabi-soft.fr!usenet
  2. From: kanze@gabi.gabi-soft.fr (J. Kanze)
  3. Newsgroups: comp.lang.c++,comp.unix.programmer
  4. Subject: Re: c++ static objects and fork
  5. Date: 26 Jan 1996 18:24:49 GMT
  6. Organization: GABI Software, Sarl.
  7. Message-ID: <KANZE.96Jan26192449@gabi.gabi-soft.fr>
  8. References: <4e8qu5$cmb@news02.comp.pge.com>
  9. NNTP-Posting-Host: gabi.gabi-soft.fr
  10. In-reply-to: psk3@pge.com's message of 25 Jan 1996 20:58:45 GMT
  11.  
  12. In article <4e8qu5$cmb@news02.comp.pge.com> psk3@pge.com (Phillip
  13. Knight) writes:
  14.  
  15. > Here's a simple question, hopefully with a simple answer:  
  16. >     I have a program which turns itself into a daemon using fork (etc.), 
  17. > but I also have several static objects within the program.  What happens to 
  18. > these objects after the fork?  There is no exec, so they dont get created anew, 
  19. > at least I guess this is the case...
  20. >     Anyone have this figured out?  BTW, system is HPUX v 9.04.
  21.  
  22. In general, they will have exactly the same state in both of the
  23. processes; the fork duplicates the state.
  24. -- 
  25. James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
  26. GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
  27. Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  28.               -- A la recherche d'une activitΘ dans une region francophone
  29.